#include "Single.h"
#include "BSP.h"
#include "MG_Driver.h"
#include "RFID.h"
#include "TSDA.h"

//-------------------------------------------------------------------------------------
// 重写RFID读取ID卡中断回调函数

#define COUNT_CARDS 3

// ID_Card卡号
uint8_t ID_Cards[COUNT_CARDS][4] = {{0x32, 0xEA, 0xC9, 0xF3},
                                    {0x82, 0x3A, 0xCA, 0xF3},
                                    {0xA2, 0x49, 0xCA, 0xF3}};

/* RFID读卡判断位置 */
void RFID_Function(uint8_t *RFID_ID)
{
    for (uint8_t i = 0; i < COUNT_CARDS; i++)
    {
        if (RFID_ID[0] == ID_Cards[i][0] && RFID_ID[1] == ID_Cards[i][1] && RFID_ID[2] == ID_Cards[i][2] && RFID_ID[3] == ID_Cards[i][3])
        {
            // TODO:
            break; // 直接退出循环
        }
    }
}